package com.vonchenchen.usbmuxd_android.custom.testcmd;

/**
 * Created by lidechen on 10/24/16.
 */

public class DemoProtocolCtlCmd {

    private static final int CMD_LENGHT = 69;

    public NetHeader phr;   // 4
    public byte source;     // 1
    public byte[] tid;      // 64

    public byte[] getByteArray(String uuid){

        byte[] ret = new byte[CMD_LENGHT];

        ret[0] = phr.magic1;
        ret[1] = phr.magic2;
        ret[2] = phr.version;
        ret[3] = phr.type;

        ret[4] = source;

        System.arraycopy(uuid.getBytes(), 0, ret, 5, uuid.length());

        return ret;
    }
}
